<div class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog" style="width: 600px;">
        <div class="card">
            <div class="header">
                <button type="button" class="close" ng-click="$hide()">&times;</button>
                <h4 class="modal-title">{{params.title}}</h4>
            </div>
            <div activate-input class="body">
                <form class="form-horizontal" role="form"
                      name="editForm" novalidate>
                    <div class="dj-formtable">
                        <table class="dj-table">
                            <tr ng-repeat="it in dataModel">
                                <th>
                                    {{it.columnname}}<span style="color: red;" ng-if="it.isrequired==1">*</span>

                                </th>
                                <td ng-class="{ 'has-error' : invalidColumn($index,editForm,'column')  &&  this.editForm.$submitted}" >
                                    <table >
                                        <tr>
                                            <td>
                                    <input type="text" name="column_{{$index}}" ng-model="it.content" style="width: 230px;"
                                           class="form-control" ng-required="it.isrequired==1"
                                           ng-if="it.taskcolumntype==1"/>
                                    <input type="text" name="column_{{$index}}" ng-model="it.content" style="width: 230px;"
                                           ng-pattern="/^[0-9]+(.[0-9]{2})?$/"
                                           class="form-control" ng-required="it.isrequired==1"
                                           ng-if="it.taskcolumntype==2"/>
                                    <input class="form-control" type="text" name="column_{{$index}}" style="width: 230px;"
                                           data-date-type="string" ng-required="it.isrequired==1"
                                           data-date-format="yyyy-MM-dd" ng-model="it.content" bs-datepicker
                                           ng-if="it.taskcolumntype==3"/>
                                    <input class="form-control" type="text" name="column_{{$index}}" style="width: 230px;"
                                           data-date-type="string" ng-required="it.isrequired==1"
                                           data-date-format="yyyy-MM" data-min-view="1" data-start-view="1"
                                           ng-model="it.content" bs-datepicker ng-if="it.taskcolumntype==4"/>
                                    <input class="form-control" type="text" name="column_{{$index}}" style="width: 230px;"
                                           data-date-type="string" ng-required="it.isrequired==1"
                                           format="yyyy-mm-dd hh:ii" data-min-view="1" ng-model="it.content"
                                           bs-datetimepicker ng-if="it.taskcolumntype==5"/>
                                    <input class="form-control" type="text" name="column_{{$index}}" style="width: 230px;"
                                           data-date-type="string" ng-required="it.isrequired==1"
                                           data-date-format="yyyy" data-min-view="2" data-start-view="2"
                                           ng-model="it.content" bs-datepicker ng-if="it.taskcolumntype==6"/>
                                    <span ng-show="invalidColumn($index,editForm,'column') &&  this.editForm.$submitted"
                                          class="error">必填.</span>

                                            </td><td>  {{it.tips}}</td>
                                        </tr>
                                    </table>
                                </td>

                            </tr>
                        </table>
                    </div>
                    <div class="form_foot">

                        <button type="submit" class="btn btn-primary" ng-click="addData(this.editForm.$valid)">提交并继续填写
                        </button>
                        <button type="submit" class="btn btn-primary" ng-click="addAndCloseData(this.editForm.$valid)">
                            提交并关闭
                        </button>
                        <button type="button" class="btn btn-default" ng-click="$hide()">关闭</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
